Skip to content

NodeJS: Replace SimpleLogRecordProcessor by BatchLogRecordProcessor #1801

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 7, 2025

Conversation

rndD
Copy link
Contributor

@rndD rndD commented May 7, 2025

Fixes #1798

SimpleLogRecordProcessor has a concurrency limit of 30 simultaneous export promises. After hitting this limit, the Processor throws the error Error: Concurrent export limit reached.

To avoid the error during heavy logging, we can use BatchLogRecordProcessor.

BatchLogRecordProcessor can already be configured via env vars, which is good for lambda layer:

  • OTEL_BLRP_MAX_EXPORT_BATCH_SIZE
  • OTEL_BLRP_MAX_QUEUE_SIZE
  • OTEL_BLRP_SCHEDULE_DELAY
  • OTEL_BLRP_EXPORT_TIMEOUT

@rndD rndD requested a review from a team as a code owner May 7, 2025 16:54
Copy link

linux-foundation-easycla bot commented May 7, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@rndD
Copy link
Contributor Author

rndD commented May 7, 2025

cc @serkan-ozal

@serkan-ozal
Copy link
Contributor

Thanks @rndD,
That's fast :)
I have added one minor comment.

@serkan-ozal
Copy link
Contributor

@rndD PR look good, but there is lint issue. Can you fix that by npm run lint:fix

@rndD
Copy link
Contributor Author

rndD commented May 7, 2025

That's fast :)

Had it ready. I was testing if the batchProcessor solves the problem. I might say that the publishing layer took a while to do manually. I appreciate all the infrastructure you built to make layers publicly available.

Any chance you can trigger nodejs layer publish after merging this one?

@serkan-ozal
Copy link
Contributor

Hi @rndD,

I think we should wait this PR (#1789) got approved and merged for the next release, but not sure what @tylerbenson thinks

@serkan-ozal serkan-ozal merged commit dcbdf00 into open-telemetry:main May 7, 2025
12 checks passed
@tylerbenson
Copy link
Member

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Concurrent export limit reached during intensive logging
3 participants